home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / midi / gfft.lha / gfft-2.03 / source / gfft-2.03-source.lha / commands.c < prev    next >
C/C++ Source or Header  |  1996-01-02  |  6KB  |  168 lines

  1. /***************************************************************************
  2.  *          Copyright (C) 1994  Charles P. Peterson                  *
  3.  *         4007 Enchanted Sun, San Antonio, Texas 78244-1254             *
  4.  *              Email: Charles_P_Peterson@fcircus.sat.tx.us                *
  5.  *                                                                         *
  6.  *          This is free software with NO WARRANTY.                  *
  7.  *          See gfft.c, or run program itself, for details.              *
  8.  *              Support is available for a fee.                      *
  9.  ***************************************************************************
  10.  *
  11.  * Program:     gfft--General FFT analysis
  12.  * File:        commands.c
  13.  * Purpose:     define command strings
  14.  * Author:      Charles Peterson (CPP)
  15.  * History:     28-May-1993 CPP; Created.
  16.  *              9-Aug-94 CPP (1.10); Minor semantic changes and Hidden3D
  17.  *              19-Jan-95 CPP (1.20); 'CLI' command
  18.  *              19-Jan-95 CPP (1.21); Topaz command
  19.  *
  20.  */
  21.  
  22. #include "gfft.h"
  23.  
  24. char *default_command (char *arguments)
  25. {
  26.     error_message (UNSUPPORTED_COMMAND);
  27.     RAISE_ERROR (NOTHING_SPECIAL); /* longjmp outa here! */
  28.     return arguments;
  29. }
  30.  
  31. char *default_argument (char *arguments)
  32. {
  33.     error_message (NO_SUCH_ARGUMENT);
  34.     RAISE_ERROR (NOTHING_SPECIAL); /* longjmp outa here! */
  35.     return arguments;
  36. }
  37.  
  38. #ifdef AMIGA
  39. static char *already_in_cli_mode (char *arguments)
  40. {
  41.     error_message (ALREADY_IN_CLI_MODE);
  42.     return arguments;
  43. }
  44. #endif
  45.  
  46. Name_Info_St Gfft_Command[] = {
  47.  
  48.   {"?", "?", question_message},
  49.   {"About", "AB", about_message},
  50.   {"Amplitude", "AM", set_amplitude},
  51.   {"Append", "AP", set_append},
  52.   {"Banner", "BA", banner_message},
  53.   {"Bins", "BIN", set_bins},
  54.   {"Bits", "BIT", set_bits},
  55.   {"74dB-Blackman-Harris", "74D", set_blackman_harris_74db},
  56.   {"92dB-Blackman-Harris", "92D", set_blackman_harris_92db},
  57.   {"Calibration", "CAL", set_calibration},
  58.   {"Channel", "CH", set_channel},
  59. #ifdef AMIGA
  60.   {"CLI", "CL", already_in_cli_mode},
  61. #endif
  62.   {"CombinePlots", "COM", set_combine_plots},
  63.   {"Copying", "COP", copying_message},
  64.   {"CutCombinedPlot", "CU", cut_combined_plot},
  65.   {"dB", "DB", set_db},
  66.   {"dBCalibration", "DBC", set_db_calibration},
  67.   {"ExecuteScript", "EXE", load_settings},
  68.   {"Exit", "EXI", quit},
  69.   {"FFT-Complex", "FF", set_fft},
  70.   {"Frames", "FR", set_frames},
  71.   {"Go", "G", ok},
  72.   {"Hamming", "HAM", set_hamming},
  73.   {"Hann", "HAN", set_hann},
  74.   {"Header", "HEA", set_header},
  75.   {"Help", "HEL", help_message},
  76.   {"Hidden3D", "HID", set_hidden_3d},
  77.   {"HighFrequency", "HIGHF", set_high_frequency},
  78.   {"HighY","HIGHY", set_high_y},
  79.   {"IgnoreFormat", "IG", set_ignore_format},
  80.   {"Interleave", "INT", set_interleave},
  81.   {"Key", "K", set_key},
  82.   {"LoadSettings", "LOA", load_settings},
  83.   {"LogX", "LOGX", set_logx},
  84.   {"LogY", "LOGY", set_logy},
  85.   {"LowFrequency", "LOWF", set_low_frequency},
  86.   {"LowY","LOWY", set_low_y},
  87.   {"Mean", "ME", set_mean},
  88.   {"Multiply", "MU", set_multiply},
  89.   {"NoCalibration", "NOCA", set_no_calibrations},
  90.   {"NoCombinePlots", "NOCO", set_no_combine_plots},
  91.   {"NodB", "NOD", set_no_db},
  92.   {"NoHeader", "NOHE", set_no_header},
  93.   {"NoHidden3D", "NOHI", set_no_hidden_3d},
  94.   {"NoIgnoreFormat", "NOIG", set_no_ignore_format},
  95.   {"NoInterleave", "NOINT", set_no_interleave},
  96.   {"NoLogX", "NOLOGX", set_no_logx},
  97.   {"NoLogY", "NOLOGY", set_no_logy},
  98.   {"NoNumerical", "NON", set_no_numerical},
  99.   {"NoOneShotOnly", "NOON", set_no_one_shot_only},
  100.   {"NoOverlap", "NOOV", set_no_overlap},
  101.   {"NoPad", "NOPAD", set_no_pad},
  102.   {"NoParseval", "NOPAR", set_no_parseval},
  103.   {"NoPink", "NOPI", set_no_pink},
  104.   {"NoPlot", "NOPL", set_no_plot},
  105.   {"NoPSDensity", "NOPS", set_no_psdensity},
  106.   {"NoQuantize","NOQ", set_no_quantization},
  107.   {"NoRepeatOnly", "NOR", set_no_repeat_only},
  108.   {"NoSaveMemory", "NOSA", set_no_save_memory},
  109.   {"NoSquaredSmoothing", "NOSQ", set_no_squared_smoothing},
  110.   {"NoTime3D", "NOT", set_no_time_3d},
  111.   {"NoWarranty", "NOW", no_warranty_message},
  112.   {"Numerical", "NU", set_numerical},
  113.   {"Octave", "OC", set_octave},
  114.   {"OK", "OK", ok},  /* batch_command depends on OK not Ok !!! */
  115.   {"Open", "OP", set_append},
  116.   {"OneShotOnly", "ON", set_one_shot_only},
  117.   {"Overlap", "OV", set_overlap},
  118.   {"Pad", "PAD", set_pad},
  119.   {"Parseval", "PARS", set_parseval},
  120.   {"Parzen", "PARZ", set_parzen},
  121.   {"Pink", "PI", set_pink},
  122.   {"Plot", "PLOT", set_plot},
  123.   {"PlotClearCommands", "PLOTCL", clear_plot_commands},
  124.   {"PlotCommand", "PLOTCO", add_plot_command},
  125.   {"PlotOutput", "PLOTO", set_plot_output},
  126.   {"Power", "PO", set_power},
  127.   {"PSDensity", "PS", set_psdensity},
  128.   {"Quantize","QUA", set_quantization},
  129.   {"Quit", "Q", quit},
  130.   {"Rate", "RA", set_rate},
  131.   {"Read", "REA", set_read},
  132.   {"Rectangle", "REC", set_rectangle},
  133.   {"ReOutput", "REO", re_output},
  134.   {"RepeatOnly", "REPE", set_repeat_only},
  135.   {"RePlot", "REPL", re_plot},
  136.   {"RotX", "ROTX", set_rotation_x},
  137.   {"RotZ", "ROTZ", set_rotation_z},
  138.   {"SaveMemory", "SAVEM", set_save_memory},
  139.   {"SaveParameters", "SAVEP", save_parameters},
  140.   {"SaveSettings", "SAVES", save_settings},
  141.   {"Set", "SE", set},
  142.   {"ShowSettings", "SH", settings_message},
  143.   {"Signed", "SI", set_signed},
  144.   {"SmoothingSegments", "SM", set_smoothing_segments},
  145.   {"SquaredSmoothing", "SQ", set_squared_smoothing},
  146.   {"StartByte", "STARTB", set_start_byte},
  147.   {"StartFrame", "STARTF", set_start_frame},
  148.   {"Sum", "SU", set_sum},
  149.   {"Terminal", "TE", set_terminal},
  150.   {"Time3D", "TIME3", set_time_3d},
  151.   {"TimeOffset", "TIMEOF", set_time_offset},
  152.   {"TimeOverlap", "TIMEOV", set_time_overlap},
  153.   {"TimeSegments", "TIMESEGM", set_time_segments},
  154.   {"TimeSegSize", "TIMESEGS", set_time_seg_size},
  155.   {"Triangle", "TR", set_triangle},
  156.   {"Topaz", "TO", set_topaz},
  157.   {"UnSigned", "U", set_unsigned},
  158.   {"Welch", "WE", set_welch},
  159.  
  160. #ifdef AMIGA
  161.   {"Workbench", "WO", workbench_command},
  162. #endif
  163.  
  164.   {"Write", "WR", set_write},
  165.   { "", "", default_command}
  166. };
  167.  
  168.